package com.guoliang.mailService.controller;

import com.guoliang.commonUtils.CommonResult;
import com.guoliang.mailService.service.MailService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;

/**
 * @author ：Leo
 * @date ：Created in 2023/1/27 10:36
 * @description：
 */
@RestController
@RequestMapping("/edumail/mail")
@Api(description = "邮箱")
public class MailController {
    @Autowired
    private RedisTemplate<String,String> redisTemplate;
    @Autowired
    private MailService mailService;
    @GetMapping("{mailadd}")
    public CommonResult sendMail(@PathVariable("mailadd")String mail){
        mailService.sendVerifyCode(mail);
        return CommonResult.ok();
    }
}
